import { timeFormat } from '@/filters/'
import { getStore } from '@/util/store'

const jgbh = (() => {
  let org = getStore({ name: 'org' })
  console.log(org)
  return org.jgbh
})()
export default {
  index: true,
  border: true,
  stripe: true,
  addBtn: false,
  editBtn: false,
  delBtn: false,
  selection: true,
  maxHeight: 400,
  menuWidth: 400,
  indexLabel: '序号',
  align: 'center',
  column: [
    {
      labelWidth: 150,
      label: '档案编号',
      size: 'small',
      addDisplay: false,
      hide: true,
      prop: 'id'
    },
    {
      label: 'tmcode',
      size: 'small',
      addDisplay: false,
      hide: true,
      prop: 'tmcode'
    },
    {
      label: 'jktjid',
      size: 'small',
      addDisplay: false,
      hide: true,
      prop: 'jktjid'
    },
    {
      labelWidth: 150,
      label: '姓名',
      size: 'small',
      search: true,
      prop: 'name',
      addDisplay: false
    },
    {
      labelWidth: 150,
      label: '身份证号',
      size: 'small',
      search: true,
      prop: 'sfzhm',
      addDisplay: false
    },
    {
      labelWidth: 150,
      label: '档案编号',
      size: 'small',
      search: true,
      prop: 'dnbh'
    },
    {
      label: '个人基本信息ID',
      size: 'small',
      prop: 'grjbxxid',
      hide: true, //是否隐藏
      addDisplay: false
    },

    {
      labelWidth: 150,
      label: '乡镇（街道）名称',
      size: 'small',
      hide: true,
      prop: 'xzjdmc'
    },
    {
      labelWidth: 150,
      label: '村（居）委会名称',
      size: 'small',
      hide: true,
      prop: 'cwhmc',
      addDisplay: false
    },
    {
      labelWidth: 150,
      label: '村（居）委会名称',
      size: 'small',
      prop: 'cwhmcid',
      type: 'select',
      search: true,
      hide: true,
      dicUrl: `/ykdjgxxs/getvill/${jgbh}`
    },
    {
      labelWidth: 150,
      label: '建档人',
      size: 'small',
      prop: 'jdr'
    },
    {
      labelWidth: 150,
      label: '建档单位',
      size: 'small',
      hide: true,
      prop: 'jddw'
    },
    { labelWidth: 150, label: '责任医生', size: 'small', prop: 'zeys' },
    {
      labelWidth: 150,
      label: '建档日期',
      hide: true,
      size: 'small',
      valueDefault: timeFormat(new Date()),
      valueFormat: 'yyyy-MM-dd',
      format: 'yyyy-MM-dd',
      prop: 'jdrq',
      type: 'date'
    },
    {
      label: '建档日期',
      prop: 'searchTime',
      format: 'yyyy-MM-dd',
      valueFormat: 'timestamp',
      type: 'daterange',
      search: true
    }
  ]
}
